var http = require('./../../utils/http.js');
var API = require('./../../utils/API.js');
var hint = require('./../../utils/hint.js');
var txt = require('./../../utils/text.js');
var app = getApp();
Page({

  data: {
    loding: false,
    item: {
      index: 0,
      msg: 'this is a template',
      time: '2016-09-15'
    }
  },

  onLoad: function (options) {
    var that = this;
    setTimeout(function () {
       that.user_info();
    }, 500)

  },
  user_info: function () {
    var that=this;
    var data = {
      token: app.globalData.token
    };
    http.GET(API.user_info, data, function (res) {
      console.log(res);
      that.setData({
        loding: true
      })
      if (res.data.code==0){
        // that.setData({
        //    loging:false
        // })
      }
      hint.Modal(false, "cai", function (res) {
        hint.hintTxt(txt.index.confirm, txt.none);
      })
    })
  },


  onShareAppMessage: function () {

  }
})